import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * yyyy-MM-dd HH:mm:ss
 * @Auther weixx
 * @Date 2022/1/13
 */
public class XJXS {
    public static void main(String[] args) throws ParseException {
        Date date=new Date();
        System.out.println(date);
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println(sdf.format(date));
        System.out.println(sdf.parse(sdf.format(date)).getTime());

        String start="1970-01-01 00:00:00";

        Calendar c = Calendar.getInstance();
        c.setTimeInMillis(46800999);
        date = c.getTime();
        String format1 = sdf.format(sdf.parse(start));
        String format = sdf.format(date);

        System.out.println();


    }
}
